Skip to content

Conversation

@chrismaree
Copy link
Member

Problem:
The below list outlines contract import statements that are unnecessary:
The WETH9 and Lockable imports are not used in the Ethereum_Adapter contract.
The CrossDomainEnabled, IL1StandardBridge, and Lockable imports are not used in the
Polygon_Adapter contract.
The WETH9 and IERC20 imports are not used in the Arbitrum_Adapter contract.
The AdapterInterface interface is imported twice in the Arbitrum_Adapter contract.
The WETH9 and SpokePoolInterface imports are not used in the Ethereum_SpokePool contract.
The IERC20 import in the LpTokenFactoryInterface interface is unused.
The MerkleLib is imported twice in the SpokePool contract.

Solution
Removed unnecessary imports. I also changed the ordering of some of them to be more consistant (implementation, then interfaces, then external).

Signed-off-by: chrismaree <christopher.maree@gmail.com>
@chrismaree chrismaree added the OZ Audit - March Resolves issue discovered in March 2022 OZ Audit label Mar 16, 2022
@mrice32 mrice32 self-requested a review March 17, 2022 12:27
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed LpTokenFactoryInterface

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./SpokePool.sol";
import "./SpokePoolInterface.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also remove SpokePoolInterface


import "./SpokePool.sol";
import "./interfaces/WETH9.sol";
import "./SpokePoolInterface.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove SpokePoolInterface

import "./SpokePool.sol";
import "./PolygonTokenBridger.sol";
import "./interfaces/WETH9.sol";
import "./SpokePoolInterface.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove SpokePoolInterface

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in the Arbitrum one!

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but you forgot one removal: the IERC20 in the LPTokenFactoryInterface

Signed-off-by: chrismaree <christopher.maree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Audit - March Resolves issue discovered in March 2022 OZ Audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants